This way, we only need to export one function, not 3.
GValue *value)
{
const GtkStyleProperty *node;
- const GValue *val;
g_return_val_if_fail (GTK_IS_STYLE_PROPERTIES (props), FALSE);
g_return_val_if_fail (property != NULL, FALSE);
return FALSE;
}
- val = _gtk_style_properties_peek_property (props, node, state);
- g_value_init (value, node->pspec->value_type);
-
- if (val)
- _gtk_style_property_resolve (node, props, state, context, (GValue *) val, value);
- else if (_gtk_style_property_is_shorthand (node))
- _gtk_style_property_pack (node, props, state, context, value);
- else
- _gtk_style_property_default_value (node, props, state, value);
-
+ _gtk_style_property_query (node, props, state, context, value);
return TRUE;
}
#include "gtkcssparserprivate.h"
#include "gtkcsstypesprivate.h"
#include "gtkprivatetypebuiltins.h"
+#include "gtkstylepropertiesprivate.h"
/* the actual parsers we have */
#include "gtkanimationdescription.h"
func (value, string);
}
-void
+static void
_gtk_style_property_default_value (const GtkStyleProperty *property,
GtkStyleProperties *properties,
GtkStateFlags state,
return TRUE;
}
-void
+static void
_gtk_style_property_resolve (const GtkStyleProperty *property,
GtkStyleProperties *props,
GtkStateFlags state,
return property->unpack_func (value, n_params);
}
-void
+static void
_gtk_style_property_pack (const GtkStyleProperty *property,
GtkStyleProperties *props,
GtkStateFlags state,
property->pack_func (value, props, state, context);
}
+void
+_gtk_style_property_query (const GtkStyleProperty *property,
+ GtkStyleProperties *props,
+ GtkStateFlags state,
+ GtkStylePropertyContext *context,
+ GValue *value)
+{
+ const GValue *val;
+
+ g_return_if_fail (property != NULL);
+ g_return_if_fail (GTK_IS_STYLE_PROPERTIES (props));
+ g_return_if_fail (context != NULL);
+ g_return_if_fail (value != NULL);
+
+ val = _gtk_style_properties_peek_property (props, property, state);
+ g_value_init (value, property->pspec->value_type);
+
+ if (val)
+ _gtk_style_property_resolve (property, props, state, context, (GValue *) val, value);
+ else if (_gtk_style_property_is_shorthand (property))
+ _gtk_style_property_pack (property, props, state, context, value);
+ else
+ _gtk_style_property_default_value (property, props, state, value);
+}
+
#define rgba_init(rgba, r, g, b, a) G_STMT_START{ \
(rgba)->red = (r); \
(rgba)->green = (g); \
gboolean _gtk_style_property_is_inherit (const GtkStyleProperty *property);
guint _gtk_style_property_get_id (const GtkStyleProperty *property);
-void _gtk_style_property_default_value (const GtkStyleProperty *property,
- GtkStyleProperties *properties,
- GtkStateFlags state,
- GValue *value);
const GValue * _gtk_style_property_get_initial_value
(const GtkStyleProperty *property);
-void _gtk_style_property_resolve (const GtkStyleProperty *property,
- GtkStyleProperties *properties,
- GtkStateFlags state,
- GtkStylePropertyContext *context,
- GValue *orig_value,
- GValue *out_value);
-
gboolean _gtk_style_property_is_shorthand (const GtkStyleProperty *property);
GParameter * _gtk_style_property_unpack (const GtkStyleProperty *property,
const GValue *value,
guint *n_params);
-void _gtk_style_property_pack (const GtkStyleProperty *property,
- GtkStyleProperties *props,
- GtkStateFlags state,
- GtkStylePropertyContext *context,
- GValue *value);
gboolean _gtk_style_property_parse_value (const GtkStyleProperty *property,
GValue *value,
const GValue *value,
GString *string);
+void _gtk_style_property_query (const GtkStyleProperty *property,
+ GtkStyleProperties *props,
+ GtkStateFlags state,
+ GtkStylePropertyContext *context,
+ GValue *value);
+
G_END_DECLS
#endif /* __GTK_CSS_STYLEPROPERTY_PRIVATE_H__ */